package com.qd.common.panda.domain.entity.record;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


/**
 * 开票记录明细
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class UserBillRecordsDetailsDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "明细ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "明细ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String did;
    /**
     * 记录ID
     */
    @NotBlank(message = "记录ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "记录ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String logId;
    /**
     * 行程ID
     */
    @NotBlank(message = "行程ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "行程ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String sid;

    @Override
    public void freeData() {
        this.did = null;
        this.logId = null;
        this.sid = null;
        super.freeData();
    }
}
